package com.wuzf.mall.bottom

class ItemBuilder {

    private var items = LinkedHashMap<BottomTabBean, BottomTabFragment>()

    companion object {
        fun builder() = ItemBuilder()
    }

    fun addItem(key: BottomTabBean, value: BottomTabFragment): ItemBuilder {
        items[key] = value
        return this
    }

    fun addItems(items: LinkedHashMap<BottomTabBean, BottomTabFragment>): ItemBuilder {
        items.putAll(items)
        return this
    }

    fun build(): LinkedHashMap<BottomTabBean, BottomTabFragment> {
        return items
    }
}